﻿namespace TSharp.Core.Authentication
{
    /// <summary>
    /// 用户验证服务
    /// </summary>
    public interface ILoginService
    {
        /// <summary>
        /// 登录验证
        /// </summary>
        bool Login(string username, string password, bool createPersistentCookie);

        /// <summary>
        /// 注销登录
        /// </summary>
        void LogOut();

        /// <summary>
        /// 根据上下文登录票证获取当前登录用户
        /// </summary>
        /// <returns>ILoginUser.</returns>
        ILoginUser GetLoginUser();

        /// <summary>
        /// 密码找回
        /// </summary>
        bool GetPassword(string username, string mail);
    }
}